package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.NewEnergyStrategyMapper;
import com.ruoyi.mes.domain.NewEnergyStrategy;
import com.ruoyi.mes.service.INewEnergyStrategyService;

/**
 * 节能策略库Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class NewEnergyStrategyServiceImpl implements INewEnergyStrategyService 
{
    @Autowired
    private NewEnergyStrategyMapper newEnergyStrategyMapper;

    /**
     * 查询节能策略库
     * 
     * @param strategyId 节能策略库主键
     * @return 节能策略库
     */
    @Override
    public NewEnergyStrategy selectNewEnergyStrategyByStrategyId(Long strategyId)
    {
        return newEnergyStrategyMapper.selectNewEnergyStrategyByStrategyId(strategyId);
    }

    /**
     * 查询节能策略库列表
     * 
     * @param newEnergyStrategy 节能策略库
     * @return 节能策略库
     */
    @Override
    public List<NewEnergyStrategy> selectNewEnergyStrategyList(NewEnergyStrategy newEnergyStrategy)
    {
        return newEnergyStrategyMapper.selectNewEnergyStrategyList(newEnergyStrategy);
    }

    /**
     * 新增节能策略库
     * 
     * @param newEnergyStrategy 节能策略库
     * @return 结果
     */
    @Override
    public int insertNewEnergyStrategy(NewEnergyStrategy newEnergyStrategy)
    {
        return newEnergyStrategyMapper.insertNewEnergyStrategy(newEnergyStrategy);
    }

    /**
     * 修改节能策略库
     * 
     * @param newEnergyStrategy 节能策略库
     * @return 结果
     */
    @Override
    public int updateNewEnergyStrategy(NewEnergyStrategy newEnergyStrategy)
    {
        return newEnergyStrategyMapper.updateNewEnergyStrategy(newEnergyStrategy);
    }

    /**
     * 批量删除节能策略库
     * 
     * @param strategyIds 需要删除的节能策略库主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyStrategyByStrategyIds(Long[] strategyIds)
    {
        return newEnergyStrategyMapper.deleteNewEnergyStrategyByStrategyIds(strategyIds);
    }

    /**
     * 删除节能策略库信息
     * 
     * @param strategyId 节能策略库主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyStrategyByStrategyId(Long strategyId)
    {
        return newEnergyStrategyMapper.deleteNewEnergyStrategyByStrategyId(strategyId);
    }
}
